﻿package mortal.game.view.shopMall.view
{
    import Message.Game.*;
    import com.greensock.layout.*;
    import com.mui.controls.*;
    import extend.language.*;
    import flash.events.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.util.*;

    public class ShopMallPanel extends ShopCommonPanel
    {
        private var _rechargeBtn:GLoadingButton;
        private var _goldBindText:GTextFiled;
        private var _goldText:GTextFiled;
        private var _bmpYuanbao:GBitmap;
        private var _bmpYuanbaoBind:GBitmap;

        public function ShopMallPanel()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatHuang;
            _loc_1.size = 12;
            _loc_1.bold = true;
            this.pushUIToDisposeVec(UIFactory.bg(450, 437, 178, 18, this, ImagesConst.PanelBg));
            this.pushUIToDisposeVec(UIFactory.bg(450, 463, 178, 18, this, ImagesConst.PanelBg));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(35569), 455, 437, 100, 30, this, _loc_1.left(), true));
            this.pushUIToDisposeVec(UIFactory.gTextField(Language.getString(35570), 453, 463, 100, 30, this, _loc_1.left(), true));
            _loc_1.align = AlignMode.RIGHT;
            this._goldText = UIFactory.gTextField("", 503, 439, 100, 30, this, _loc_1, true);
            this._goldBindText = UIFactory.gTextField("", 503, 466, 100, 30, this, _loc_1, true);
            this._bmpYuanbao = UIFactory.gBitmap(ImagesConst.Yuanbao, 605, 437, this);
            this._bmpYuanbaoBind = UIFactory.gBitmap(ImagesConst.Yuanbao_bind, 605, 463, this);
            this._rechargeBtn = UIFactory.gLoadingButton(ResFileConst.ShopRechargeBtn, 630, 444, 124, 37, this);
            this._rechargeBtn.configEventListener(MouseEvent.CLICK, this.rechargeMoney);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._goldBindText.dispose(param1);
            this._goldText.dispose(param1);
            this._bmpYuanbao.dispose(param1);
            this._bmpYuanbaoBind.dispose(param1);
            this._rechargeBtn.dispose(param1);
            this._goldBindText = null;
            this._goldText = null;
            this._bmpYuanbao = null;
            this._bmpYuanbaoBind = null;
            this._rechargeBtn = null;
            super.disposeImpl(param1);
            return;
        }// end function

        private function rechargeMoney(event:MouseEvent) : void
        {
            GameUtil.gotoRecharge(ModuleTypeConst.ShopMall);
            return;
        }// end function

        override public function updateMoney(param1:Object = null) : void
        {
            var _loc_2:* = Cache.instance.role.money;
            var _loc_3:* = MoneyUtil.getCoinHtml(_loc_2.gold);
            this._goldText.htmlText = _loc_3;
            _loc_3 = MoneyUtil.getCoinHtml(_loc_2.goldBind);
            this._goldBindText.htmlText = _loc_3;
            return;
        }// end function

    }
}
